<template>
    <div id="loading" v-show="show">
        <div>{{msg}}</div>
    </div>
</template>

<script>
export default {
    props: {
        show: Boolean,
        msg: String
    }
}
</script>

<style scoped lang="scss">
#loading {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, .3);
    display: flex;
    justify-content: center;
    align-items: center;
    div{
        font-size: 0.24rem;
        background-color: rgba(0, 0, 0, 0.8);
        color: #fff;
        padding: 10px 20px;
        max-width: 200px;
        border-radius: 6px;
    }
}
</style>